/**
 * 2019-06-12 18:46:27
 */
package com.cdxy.model.dto.message;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * Esion
 */
@ApiModel(description = "请求分页结构体")
public class PageReq<T> {
    @ApiModelProperty(value = "当前页，若请求<=0 则为1")
    private int current = 1;
    @ApiModelProperty(value = "每页数量，若<=0 则为10")
    private int size = 10;
    @ApiModelProperty(value = "限制条件查找对象")
    private T searchObj;
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        if (current <= 0) {
            this.current = 1;
        } else {
            this.current = current;
        }
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        if (size <= 0) {
            this.size = 10;
        } else {
            this.size = size;
        }
    }

    public T getSearchObj() {
        return searchObj;
    }

    public void setSearchObj(T searchObj) {
        this.searchObj = searchObj;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

}
